<!DOCTYPE html>
<html>
<head>
    <title>Event Bubbling Example</title>
    <script type="text/javascript">
    
        window.onload = function(){
            window.onclick = function(){
                alert("Window");
            };
            
            document.onclick = function(){
                alert("Document");
            };
            
            document.documentElement.onclick = function(){
                alert("Html");
            };
            
            document.body.onclick = function(){
                alert("Body");
            };
            document.getElementById("myDiv").onclick = function(){
                alert("Div");
            };
        }
    

    </script>
</head>
<body>
    <div id="myDiv">Click Me</div>

    
</body>
</html>
